Skip to content

Conversation

@isullivan
Copy link
Contributor

No description provided.

This is really meant to catch cases where diaSources is an empty catalog, and attempting to set the column even to an empty array will raise a `TypeError`
Copy link
Contributor

@mrawls mrawls left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this improvement - I agree catching glints after removing unphysical sources and making sure we aren't letting sky sources be part of a glint trail is what we want. Just one clarifying question I'd like to understand before hitting "approve."

Comment on lines +909 to +910
if np.any(glint_mask):
diaSources['glint_trail'] = np.array(glint_mask)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If there are in fact diaSources, and glint_mask is full of False, wouldn't this leave the column empty?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, diaSources['glint_trail'] is all False before this line, not empty.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah ok, so self.schema.addField("glint_trail", "Flag", "DiaSource is part of a glint trail.") creates the column AND sets it default False? The more you know 🌈

@isullivan isullivan merged commit 35b2349 into main Aug 21, 2025
5 checks passed
@isullivan isullivan deleted the tickets/DM-52258 branch August 21, 2025 05:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants